import Vue from 'vue'
import VueRouter from 'vue-router'
import HomePage from '../components/HomePage.vue'
import ShouYe from '../views/HomeTop/ShouYe.vue'
import Common from '../views/HomeTop/Common.vue'
// import Fresh from '../views/Fresh.vue'
import Goods from '../views/HomeTop/Goods.vue'
import Slow from '../views/HomeTop/Slow.vue'

import ChangBei from '../views/HomeLeft/ChangBei.vue'
import BaoJian from '../views/HomeLeft/BaoJian.vue'
import YangSheng from '../views/HomeLeft/YangSheng.vue'
import QiXie from '../views/HomeLeft/QiXie.vue'

import Login from '../components/Logins/Login.vue'
import Register from '../components/Logins/Register.vue'
import NotFound from '../components/NotFound.vue'


Vue.use(VueRouter)


const routes = [
  {
    path: '/HomePage',
    name: 'HomePage',
    component: HomePage,
    children:[
      {
        path: '/views/ShouYe',
        name: 'ShouYe',
        component: ShouYe
      },
      {
        path: '/views/Goods',
        name: 'Goods',
        component: Goods
      },
      {
        path: '/views/Slow',
        name: 'Slow',
        component: Slow
      },
      {
        path: '/views/Common',
        name: 'Common',
        component: Common
      },
      {
        path: '/views/ChangBei',
        name: 'ChangBei',
        component: ChangBei
      },
      {
        path: '/views/BaoJian',
        name: 'BaoJian',
        component: BaoJian
      },
      {
        path: '/views/YangSheng',
        name: 'YangSheng',
        component: YangSheng
      },
      {
        path: '/views/QiXie',
        name: 'QiXie',
        component: QiXie
      },
    ]
  },
  {
    path: '/Logins/Login',
    name: 'Login',
    component: Login
  },
  {
    path: '/Logins/Register',
    name: 'Register',
    component: Register
  },
  {
    path: '*',
    name: 'NotFound',
    component: NotFound
  }
]

const router = new VueRouter({
  routes,
  // 去掉#号
  mode:'history'
})

export default router
